<div id="login-box" class="modal">
    <div class="login-head">
        <img src="<?php echo Yii::app()->theme->baseUrl; ?>/img/back-end/logo1.png" class="logo-img" width="120px"/>
        <strong>Admin CP Login</strong>
        <div class="clear"></div>
    </div>
    <div class="login-main">
        <div class="form-desc"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/img/back-end/login.png" width="70px"/></div>
        <div class="form-wrapper">
			<?php $form=$this->beginWidget('CActiveForm', array(
			        'id'=>'login',
			        'enableClientValidation'=>true,
			        'clientOptions'=>array(
			            'validateOnSubmit'=>true,
			        ),
					'htmlOptions' => array('class' => 'form-horizontal')
			    )); ?>
			    <div class="control-group">
		            <?php echo $form->labelEx($model,'username', array('class' => 'control-label')); ?>
		            <div class="controls">
						<?php echo $form->textField($model,'username'); ?>
						<?php echo $form->error($model,'username'); ?>
					</div>
		        </div>
		        
			    <div class="control-group">
		            <?php echo $form->labelEx($model,'password', array('class' => 'control-label')); ?>
		            <div class="controls">
						<?php echo $form->passwordField($model,'password'); ?>
						<?php echo $form->error($model,'password'); ?>
					</div>
		        </div>
			    <div class="control-group rememberMe">
		            <div class="controls">
			            <?php echo $form->checkBox($model,'rememberMe', array('style' => 'float:left;margin-left:20px')); ?>
			            <?php echo $form->label($model,'rememberMe', array('style' => 'float:left;margin-left:5px')); ?>
			            <?php echo $form->error($model,'rememberMe'); ?>
					</div>
		        </div>

		        <div class="row buttons">
		            <?php echo CHtml::submitButton('Login',array('class'=>'btn btn-danger login-submit')); ?>
		        </div>
			<?php $this->endWidget(); ?>
        </div>
        <div class="clear"></div>
    </div>
</div>
<style>
#login-box {
    border: 1px solid #d4d4d4;
    border-top: 5px solid #d92727;
    width: 550px;
}
.modal-backdrop {
    background: #e5e5e5;
}
.login-head {
    border-bottom: 1px solid #d4d4d4;
}
.login-head strong {
    display: block;
    float: left;
    padding-left: 30px;
    padding-top: 17px;
    font-size: 24px;
    color: #333;
}
.logo-img {
    float: left;
}
.login-main {
    margin: 20px;
}
.form-desc {
    float: left;
    width: 20%;
    text-align: center;
    margin: 10px 0;
}
.form-wrapper {
    float: left;
    width: 80%;
}
.control-label {
    text-transform: uppercase;
    font-weight: bold;
}
.form-horizontal {
    text-align: center;
}
.login-submit {
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}
</style>

<script>
$(function(){
    $('#login-box').modal().live('hide', function(evt){
	    evt.preventDefault();
    });
});
</script>
<script>$(function(){$('[name="identity"]').focus()})</script>